import request from "../../request";

const baseUrl = (id) => {
  return `/admin/withdraw/order` + (id ? `/${id}` : '')
}

export const AdminWithdrawOrderList = (params) => {
  return request.get(baseUrl(), params)
}

export const AdminWithdrawOrderInfo = (id, params) => {
  return request.get(baseUrl(id), params)
}

export const AdminWithdrawOrderPost = (id, data) => {
  if (id) {
    return request.put(baseUrl(id), data)
  } else {
    return request.post(baseUrl(), data)
  }
}

export const AdminWithdrawOrderDel = (id) => {
  return request.delete(baseUrl(id))
}
